<template>
  <div id="dialog">
    <el-dialog
      :title="operateType === 'add' ? '新增用户' : '编辑用户'"
      :visible.sync="isShow"
    >
      <common-form
        :formLabel="operateFormLabel"
        :form="operateForm"
        :inline="true"
        ref="form"
      ></common-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取消</el-button>
        <el-button @click="comfirm" type="primary">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import CommonForm from '@/components/content/commonform/CommonForm'
export default {
  name: 'CommonDialog',
  components: {
    CommonForm
  },
  props: {
    operateType: String,
    isShow: Boolean,
    operateFormLabel: Array,
    operateForm: Object,
    formLabel: Array,
    seachForm: Object,
  },
  methods: {
    comfirm() {
      this.$emit('comfirm')
    },
    cancel() {
      this.$emit('cancel')
    }
  }
}
</script>

<style scoped>

</style>